<!doctype html>
	<head>

		<meta http-equiv="content-type" content="text/html;charset=utf-8">
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta id="vieport" name="viewport"
			content="width=640, initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5">
		<script type="text/javascript" src="js/jquery-1.8.0.min.js"></script>
        <script type="text/javascript" src="js/jquery.nicescroll.js"></script>
		<script type="text/javascript" src="js/jquery.cookie.js"></script>
		<script type="text/javascript" src="./js/home-jx.js?version=0310"></script>
		<script type="text/javascript" src="js/jquery.alert.js"></script>
		<link rel="stylesheet" type="text/css" href="./css/jquery.alert.css" />
		<link rel="stylesheet" type="text/css"
			href="./css/home.css?version=0310" />
		<link rel="stylesheet" type="text/css" href="common.css" />
        <script type="text/javascript" src="js/common.js?version=0310"></script>
		<script language="javascript">
		var phonenum = $.cookie('phoneNum');
		var para =  getUrlParam("op");
		var areaid;
		$(function (){
			overhidden();
			  if(para=="menu"){
				  $(".menuTd").text("菜单");
				}
			$.natureajax({	
				type: "get",
				url:jsonserver+"home_sendSMSCount.do?",//获取JSON
				data:"callback=?&Ukey="+$.cookie('U_KEY')+"&phonenum="+phonenum,
				dataType:"jsonp",
				success:function(json){
					if(json[0].result==1){
						$("#duanxintiao").append(json[1].count);
						
					}
				},
				error:function(){
					jAlert("抱歉，出错了",'注销',function(e){});
				}
				
			});
			if(versionFlag=="bj"){
				areaid = 1;
				}else{
					areaid = 17;
					}
			$.natureajax({
				type: "get",
				url:jsonserver+"recomm_list.do?",//获取JSON
				data:"callback=?&phonenum="+phonenum+"&areaid="+areaid,
				dataType:"jsonp",
				success:function(json){
					if(json[0].result==1){
						if(json[1].length>0){
							//地域进行遍历
							var _html='';
							for(i=0;i<json[1].length;i++){		
								var obj = json[1][i];
									if(i==json[1].length-1){
										_html +='<div class="dange" onclick="xiangxi('+obj.BST_PARENT_ID+',\''+obj.BST_NAME+'\');"> <div class="bigTittle"> '+ obj.BST_NAME +'</div>'
										+ ' <div class="demo">'+obj.BST_RET_MONEY_1+'</div>'
										+'<div class="youjiantou1"></div></div><br>';
									}else{
										_html +='<div class="dange" onclick="xiangxi('+obj.BST_PARENT_ID+',\''+obj.BST_NAME+'\')"> <div class="bigTittle"> '+ obj.BST_NAME +'</div>'
										+ ' <div class="demo">'+obj.BST_RET_MONEY_1+'</div>'
										+'<div class="youjiantou1"></div></div>'
										+'<div class="shixian"></div>';
									}
									
									
							}
							$("#businessliebiao").append(_html);
						}
					}
				},
				error:function(){
					jAlert("抱歉，出错了",'注销',function(e){});
				}
				
			});
			
			
		})
		function xiangxi(busi_id,busi_name){	 
		        var url ="./business3G.html";
				url+="?busi_id="+busi_id+"&busi_name="+escape(busi_name);
		        window.location.href=url;
		 
		}
		function fanhui(){	 
		
			  if(para=="menu"){
					//alert(para);
				  window.location.href="menu.html?rp=businessRecommend";
			  }else
			  {
				  window.history.go(-1);
				  }
		}
		function getUrlParam(name){	 
			var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
			   var r = window.location.search.substr(1).match(reg);   
			    if (r != null) {
				    return unescape(r[2]); 
			    }else{
				    return null;
			    }
		}
		function overhidden(){
			var w=document.body.clientWidth;
			$(".demo").width(w*0.1+"px");
		}
		</script>
		<link type="text/css" href="css/business.css" rel="stylesheet" />
		<title>推荐</title>
	</head>
	<body onresize="resize()">
		<div id="bodyobj" class="bigimg" style="overflow: hidden;" >
			<div id="header" style="text-align:center;" class="header">
		          <table class="headerTal">
		            <tr>
		              <td class="menuTd" onclick="fanhui()">返回</td>
		              <td style="font-size:32px; color:#fff; width:60%;">业务推荐</td>
		              <td width="30%"></td>
		            </tr>
		          </table>
        	</div>
				
				<div id="home1" style=" width: 100%; ">
					<!--页面主体开始-->
					
					
					<div class="top">
						<div class="bigfront"></div>
						<div class="textBorderleft"></div>
						<div class="textBorder">
							<div style="margin-left: 40px;font-size: 30px;color: blue;">请问您的朋友需要何种业务</div>
							<div style="margin-left: 40px;font-size: 26px;">您今日还可推荐<font color="blue" id="duanxintiao"></font>条</div>
						</div>
					</div>
					<div class="xuxian"></div>
					<div class="middle1">
						<div class="demofront" onclick="window.location.href='taocanxiangqing.html'">
							(？)点击查看业务详细信息
						</div>
						<div class="border"  id="businessliebiao">
							
							
						</div>
						
					</div>
					<!--页面主体结束-->
					<div style="height: 30px;"></div>
				</div>
				<div class="bottom"></div>
				
			</div>
            <br><br><br><br><br><br><br><br>
	</body>
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
	
</html>
